package t10086.Model.Entity;

import jakarta.persistence.*;

import java.time.LocalDate;

@Entity
@Table(name = "robot")
public class Robot {
    @Id
    @Column(name = "serial_number", nullable = false,columnDefinition = "VARCHAR(255)")
    private String serialNumber;
    @Column(name = "series",nullable = false,columnDefinition = "VARCHAR(255)")
    private String series;
    @Column(name = "factory_date",nullable = false,columnDefinition = "date")
    private LocalDate factoryDate;


    public Robot(String serialNumber, String series, LocalDate factoryDate) {
     this.serialNumber = serialNumber;
     this.series = series;
     this.factoryDate = factoryDate;
    }

    public Robot() {}

    public String getStatus() {
        return this.series;
    }
    public String getSerialNumber() {
        return this.serialNumber;
    }
    public LocalDate getFactoryDate() { return factoryDate; }

    public void setStatus(String status) {
        this.series = status;
    }
    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }
    public void setFactoryDate(LocalDate factoryDate) { this.factoryDate = factoryDate; }

    @Override
    public String toString() {
        return "Robot [serialNumber=" + serialNumber + ", series=" + series
                + ", factoryDate=" + factoryDate;
    }
}
